package com.victualler.product.customer.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.victualler.core.base.dao.BaseDao;
import com.victualler.core.common.annotation.InitEditColumn;
import com.victualler.core.common.annotation.ListShowColumn;
import com.victualler.core.common.enums.ColumnFormatEnum;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author Guoshichang
 * @since 14:53 on 2018/10/3.
 */
@Entity
@Table(name="customer")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class CustomerDao extends BaseDao implements Serializable {



    //客户图标
    @ListShowColumn(title = "客户图标",sort = 0,type = ColumnFormatEnum.IMAGE)
    @InitEditColumn(title = "客户图标",sort = 0,type = ColumnFormatEnum.IMAGE)
    private Long imageId;

    //客户编号
    @Column(nullable = false)
    @ListShowColumn(title = "客户编号",sort = 1)
    @InitEditColumn(title = "客户编号",sort = 1)
    private String customerNo;

    //客户名称
    @Column(nullable = false)
    @ListShowColumn(title = "客户名称",sort = 2)
    @InitEditColumn(title = "客户名称",sort = 2)
    private String name;

    //客户类型
    @ListShowColumn(title = "客户类型",sort = 3,type = ColumnFormatEnum.DICT,dictCodeType = "CustomerType")
    @InitEditColumn(title = "客户类型",sort = 3,type = ColumnFormatEnum.DICT,dictCodeType = "CustomerType")
    private String type;

    //客户等级
    @ListShowColumn(title = "客户等级",sort = 4,type = ColumnFormatEnum.DICT,dictCodeType = "CustomerLevel")
    @InitEditColumn(title = "客户等级",sort = 4,type = ColumnFormatEnum.DICT,dictCodeType = "CustomerLevel")
    private String level;

    //营业类型
    @ListShowColumn(title = "营业类型",sort = 5,type = ColumnFormatEnum.DICT,dictCodeType = "BusinessType")
    @InitEditColumn(title = "营业类型",sort = 5,type = ColumnFormatEnum.DICT,dictCodeType = "BusinessType")
    private String businessType;

    //归属地
    @ListShowColumn(title = "归属地",sort = 6)
    @InitEditColumn(title = "归属地",sort = 6)
    private String ascription;

    //备注
    @ListShowColumn(title = "备注",sort = 7)
    @InitEditColumn(title = "备注",sort = 7)
    private String remarks;
    //微信号对应的id
    private String openId;

    public Long getImageId() {
        return imageId;
    }

    public void setImageId(Long imageId) {
        this.imageId = imageId;
    }

    public String getCustomerNo() {
        return customerNo;
    }

    public void setCustomerNo(String customerNo) {
        this.customerNo = customerNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getAscription() {
        return ascription;
    }

    public void setAscription(String ascription) {
        this.ascription = ascription;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }
}
